#include <stdio.h>
int removeDuplic(int *nums,int numsSize)
{
    int n = 1;
    for(int i = 1;i < numsSize;i++)
    {
        if(nums[i] != nums[i-1])
            nums[n++] = nums[i];
    }
    return n;
}

int main()
{
    int nums[] = {1,1,2,2,3,4,5,5};
    int size = removeDuplic(nums,sizeof(nums)/sizeof(nums[0]));
    for(int i = 0;i < size;i++)
        printf("%d\n",nums[i]);

    return 0;
}